package com.kingdee.eas.custom.bpmworkflow.fybill.fybx.webservice;

import org.apache.axis.Message;

import org.apache.axis.MessageContext;

import org.apache.axis.message.SOAPEnvelope;

import org.apache.axis.message.SOAPHeaderElement;

import com.kingdee.bos.webservice.WSConfig;

import com.kingdee.bos.webservice.WSInvokeException;
import com.kingdee.bos.orm.core.ORMEngine;
import com.kingdee.bos.webservice.BeanConvertHelper;
import com.kingdee.bos.BOSObjectFactory;

public class WSFybxdBpmWFResFacadeSrvProxy { 

    public String UpdateBusinessData( String strBTID , String strBOID , String iProcInstID , String strStepName , String strApproverId , String strXML , String dtTime , String soapHeader ) throws WSInvokeException {
        try {
            return getController().UpdateBusinessData(
            strBTID,
            strBOID,
            iProcInstID,
            strStepName,
            strApproverId,
            strXML,
            dtTime,
            soapHeader);
        }
        catch( Throwable e ) {
            throw new WSInvokeException( e ) ;
        }
    }

    public String CreateResult( String strBTID , String strBOID , String bSuccess , String iProcInstID , String procURL , String strMessage , String soapHeader ) throws WSInvokeException {
        try {
            return getController().CreateResult(
            strBTID,
            strBOID,
            bSuccess,
            iProcInstID,
            procURL,
            strMessage,
            soapHeader);
        }
        catch( Throwable e ) {
            throw new WSInvokeException( e ) ;
        }
    }

    public String Audit( String strBTID , String strBOID , String iProcInstID , String strStepName , String strApproverId , String eAction , String strComment , String dtTime , String soapHeader ) throws WSInvokeException {
        try {
            return getController().Audit(
            strBTID,
            strBOID,
            iProcInstID,
            strStepName,
            strApproverId,
            eAction,
            strComment,
            dtTime,
            soapHeader);
        }
        catch( Throwable e ) {
            throw new WSInvokeException( e ) ;
        }
    }

    public String Rework( String strBTID , String strBOID , String iProcInstID , String strStepName , String strApproverId , String eAction , String strComment , String dtTime , String soapHeader ) throws WSInvokeException {
        try {
            return getController().Rework(
            strBTID,
            strBOID,
            iProcInstID,
            strStepName,
            strApproverId,
            eAction,
            strComment,
            dtTime,
            soapHeader);
        }
        catch( Throwable e ) {
            throw new WSInvokeException( e ) ;
        }
    }

    public String ApproveClose( String strBTID , String strBOID , String iProcInstID , String eProcessInstanceResult , String strComment , String dtTime , String soapHeader , String auditorNum ) throws WSInvokeException {
        try {
            return getController().ApproveClose(
            strBTID,
            strBOID,
            iProcInstID,
            eProcessInstanceResult,
            strComment,
            dtTime,
            soapHeader,
            auditorNum);
        }
        catch( Throwable e ) {
            throw new WSInvokeException( e ) ;
        }
    }

    private com.kingdee.eas.custom.bpmworkflow.fybill.fybx.IFybxdBpmWFResFacade getController() {
        try {
        if (WSConfig.getRomoteLocate()!=null&&WSConfig.getRomoteLocate().equals("false")){
            Message message =MessageContext.getCurrentContext().getRequestMessage();
            SOAPEnvelope soap =message.getSOAPEnvelope();
            SOAPHeaderElement headerElement=soap.getHeaderByName(WSConfig.loginQName,WSConfig.loginSessionId);
            String SessionId=headerElement.getValue();
            return ( com.kingdee.eas.custom.bpmworkflow.fybill.fybx.IFybxdBpmWFResFacade )BOSObjectFactory.createBOSObject( SessionId , "com.kingdee.eas.custom.bpmworkflow.fybill.fybx.FybxdBpmWFResFacade") ; 
        } else {
            return ( com.kingdee.eas.custom.bpmworkflow.fybill.fybx.IFybxdBpmWFResFacade )BOSObjectFactory.createRemoteBOSObject( WSConfig.getSrvURL() , "com.kingdee.eas.custom.bpmworkflow.fybill.fybx.FybxdBpmWFResFacade" , com.kingdee.eas.custom.bpmworkflow.fybill.fybx.IFybxdBpmWFResFacade.class ) ; 
        }
        }
        catch( Throwable e ) {
            return ( com.kingdee.eas.custom.bpmworkflow.fybill.fybx.IFybxdBpmWFResFacade )ORMEngine.createRemoteObject( WSConfig.getSrvURL() , "com.kingdee.eas.custom.bpmworkflow.fybill.fybx.FybxdBpmWFResFacade" , com.kingdee.eas.custom.bpmworkflow.fybill.fybx.IFybxdBpmWFResFacade.class ) ; 
        }
    }

    private BeanConvertHelper getBeanConvertor() {
        return new BeanConvertHelper(); 
    }

}